#!/usr/bin/env python


import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

# Energy
f.add(from_string = 'QM/MM "QMMM" calculation converged :',
      num_lines = 13,
      rel_tolerance = 1.0e-8)

f.add(string = '@ B-freq = 0.040000  C-freq = 0.040000',
      rel_tolerance = 1.0e-9)

test.run(['qmmm6.dal'], ['ch2o_cc-pvdz.mol'], f={'out': f}, args='-put POTENTIAL.INP')

sys.exit(test.return_code)
